load("//bazel:tachyon.bzl", "if_has_matplotlib")
load("//bazel:tachyon_cc.bzl", "tachyon_cc_library", "tachyon_matplotlib_defines")

tachyon_cc_library(
    name = "simple_reporter",
    srcs = ["simple_reporter.cc"],
    hdrs = ["simple_reporter.h"],
    force_rtti = if_has_matplotlib(True, False),
    local_defines = tachyon_matplotlib_defines(),
    visibility = ["//benchmark:__subpackages__"],
    deps = [
        ":vendor",
        "//tachyon/base/console:table_writer",
        "//tachyon/base/containers:container_util",
        "//tachyon/base/strings:string_number_conversions",
        "//tachyon/base/time",
    ] + if_has_matplotlib([
        "@com_github_soblin_matplotlibcpp17//:matplotlibcpp17",
    ]),
)

tachyon_cc_library(
    name = "field_type",
    hdrs = ["field_type.h"],
    visibility = ["//benchmark:__subpackages__"],
    deps = [
        "//tachyon/base:logging",
        "//tachyon/base/flag",
    ],
)

tachyon_cc_library(
    name = "vendor",
    hdrs = ["vendor.h"],
    visibility = ["//benchmark:__subpackages__"],
    deps = [
        "//tachyon/base:logging",
        "//tachyon/base/flag",
        "@com_google_absl//absl/strings",
    ],
)

tachyon_cc_library(
    name = "config",
    srcs = ["config.cc"],
    hdrs = ["config.h"],
    visibility = ["//benchmark:__subpackages__"],
    deps = [
        "//benchmark:vendor",
        "//tachyon/base:logging",
        "//tachyon/base/console",
        "//tachyon/base/flag:flag_parser",
    ],
)
